<?php
ob_start();
session_start();
include_once ('../../config.php');
if($_POST['vorm'] == "alle") {
$sql = "SELECT * from klassen WHERE `jaar` = '" . $_POST['jaar'] . "'";
}
if($_POST['jaar'] == "alle") {
$sql = "SELECT * from klassen WHERE  `vorm` = '" . $_POST['vorm'] . "' ";
}
if($_POST['vorm'] == "alle" && $_POST['jaar'] == "alle") {
$sql = "SELECT * from klassen";
}
if($_POST['vorm'] != "alle" && $_POST['jaar'] != "alle")
{
	$sql = "SELECT * from klassen WHERE `vorm` = '" . $_POST['vorm'] . "' AND `jaar` = '" . $_POST['jaar'] . "'";
}
	//echo $sql;
	$result = mysql_query($sql,$conn) or die(mysql_error()) ;
	if( mysql_num_rows( $result ) == 0 ) {
		echo "Er zijn geen klassen gevonden";
	}
	else
	

						while($data = mysql_fetch_assoc($result)) {
						echo "<a onclick=\"AjaxTabs.SetURL('pages/klassen/lijst.php?id=".$data['id'] ."');\">" . $data['klas'] . "<br />";
// 						var_dump($data);
						
					}
?>






<?php
ob_end_flush();
?>
				